<ul class="pagination pagination-sm no-margin pull-right">
    <li><a class="first">首页</a></li>
	<li><a class="pre">上一页</a></li>
	<li><a class="next">下一页</a></li>
	<li><a class="last">尾页</a></li>
	<li><a class="rowCount">总记录数(0)</a></li>
	<li><a class="pageCount">总页数(0)</a></li>
	<li><a class="pageCurrent">当前页(1)</a></li>
</ul>
<script type="text/javascript">
	//初始化分页信息
	function doSetPagination(data){
		$(".rowCount").html("总记录数(" + data.rowCount + ")");
		$(".pageCount").html("总页数(" + data.pageCount + ")");
		$(".pageCurrent").html("当前页(" + data.pageCurrent + ")");

		$("#pageId").data("pageCurrent", data.pageCurrent);
		$("#pageId").data("pageCount", data.pageCount);

	}
	//注册页面中元素点击事件
	$(function () {
		$(".pagination").on("click", ".first, .pre, .next, .last", doJumpToPage);
	})

	function doJumpToPage() {
		let pageCurrent = $("#pageId").data("pageCurrent");
		let pageCount = $("#pageId").data("pageCount");
		//获取点击事件的class属性
		//prop(属性名[,属性值])，若两个参数都存在则为赋值，只有第一个参数为取值
		let cls = $(this).prop("class");
		if(cls == "first"){
			pageCurrent = 1;
		}else if (cls == "pre" && pageCurrent > 1) {
			pageCurrent--;
		}else if (cls == "next" && pageCurrent < pageCount) {
			pageCurrent++;
		}else if (cls == "last") {
			pageCurrent = pageCount;
		}else{
			return;
		}
		//存储被修改的pageCurrent的值，
		$("#pageId").data("pageCurrent", pageCurrent);
		doGetObjects();
	}
</script>








